package com.jwthhealth_pub.old.physicalfitness.view;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.jwthhealth_pub.R;
import com.jwthhealth_pub.common.view.TitleLayout;
import com.jwthhealth_pub.old.common.Address.Address;
import com.jwthhealth_pub.old.common.Address.AddressDao;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/1/16.
 */
public class IndividualChoiceStateActivity extends Activity {
    @BindView(R.id.rb)
    RecyclerView rv;
    @BindView(R.id.title_layout)
    TitleLayout titleLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choice_city);
        ButterKnife.bind(this);

        initTop();
        initData();
    }

    private void initData() {
        List<Address> allAddress = AddressDao.getInstance().getProvinces();
        Log.d("IndividualChoiceStateAc", "allAddress.size():" + allAddress.size());
//        rv.setLayoutManager(new LinearLayoutManager(this));
//        rv.setAdapter(new ChoiceStateAdatper(this, allAddress));

//        cursor.close();
    }

    private void initTop() {
        titleLayout.setTitle("选择省/直辖市");
        titleLayout.setOnTitleLayoutListener(new TitleLayout.TitleLayoutListener() {
            @Override
            public void leftclick() {
                finish();
            }

            @Override
            public void leftTextClick() {

            }

            @Override
            public void rightclick() {

            }

            @Override
            public void rightTextClick() {

            }
        });
    }
}
